package com.glory.cqaospda.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.glory.cqaospda.R;
import com.glory.cqaospda.bean.QueryEqpInfoBean;
import com.glory.cqaospda.bean.QueryRaptsInfoBean;

import java.util.List;

import androidx.annotation.Nullable;

/**
 * @author lenovo
 */
public class SpareParesLifeAdapter extends BaseQuickAdapter<QueryRaptsInfoBean.PartsList, BaseViewHolder> {

    private List<QueryRaptsInfoBean.PartsList> datalist;

    public SpareParesLifeAdapter(@Nullable List<QueryRaptsInfoBean.PartsList> data) {
        super(R.layout.adapter_raptsinfo, data);
        datalist = data;
    }

    @Override
    protected void convert(BaseViewHolder helper, QueryRaptsInfoBean.PartsList item) {
        helper.setText(R.id.tvPartsCode, item.getMPartsCode());
        helper.setText(R.id.tvCountNo, item.getMCountNo());
        helper.setText(R.id.tvCounter, item.getMCounter());
        helper.setText(R.id.tvSurplus, item.getMRemain());
        helper.setText(R.id.tvCompany, item.getMCompany());
    }
}
